
# 创建临时图
NODE2VEC_CYPHER_create_temp_graph = """
CALL gds.graph.create(
  'crm',
  {
    Company: {
      label: '企业'
    },
    Project: {
      label: '工程项目'
    },
    Segment: {
      label: '工程项目标段'
    }
  }, {
    SubSegment: {
      type: '标段',
      orientation: 'UNDIRECTED'
    },
    bid: {
      type: '投标',
      orientation: 'UNDIRECTED'
    }
})
"""


NODE2VEC_Cypher_train_graph = """
CALL gds.beta.graphSage.train(
  'crm',
  {
    modelName: 'multiLabelModel',
    degreeAsProperty:true,
    epochs:20,
    searchDepth:2,
  }
)
"""

NODE2VEC_Cypher_vec = """
CALL gds.beta.graphSage.stream(
  'crm',
  {
    modelName: 'multiLabelModel'
  }
) YIELD nodeId, embedding
"""

UPDATE_CYPHER = '''
UNWIND $updates AS updateMap
    MATCH (n) WHERE id(n) = updateMap.nodeId
    SET n += updateMap.valueMap
'''